var dialogAdd;
function toAddContract(){
	var dialogStruct={
			'display':contextRootPath+'/tCMmContract/prepareExecute/toSelectContract',
			'width':800,
			'height':600,
			'title':'选择合约',
			'isIframe':'false',
			'buttons':[
			           {'text':'确定','action':doAddFromContractSure,'isClose':true},
			  		   {'text':'关闭','isClose':true}
			]
		};
	 dialogAdd =jyDialog(dialogStruct);
	 dialogAdd.open();
}
//确认合约
function doAddFromContractSure(){
	var contractCode = iframeSelectContract.iframeObj["table"].getSelectedObjs("contractCode");
	doContract(contractCode);
	dialogAdd.close();
}

//双击合约
function doAddFromContract(contractCode){
	doContract(contractCode);
	dialogAdd.close();
}



